<?PHP
if (!session_start()) { session_start(); };
/*if (!isset($_SESSION['lgnapproved'])) {
	die(header('Location: login.php'));
}*/

include("functions.php");
include("cnnxn.php");
connect();

if (isset($_POST['submit'])) {
	
	$combineddate=$_POST['eventdate_year'].'-'.$_POST['eventdate_month'].'-'.$_POST['eventdate_day'];
	
	$SQLadd='INSERT INTO av_events (eventname,eventdate) VALUES ("'.addslashes(str_replace("\r","<br />",(str_replace("\n"," ",$_POST['eventname'])))).'","'.$combineddate.'");';
	$sendit_add=mysqli_query($db,$SQLadd) or die(mysqli_error($db));
	mysqli_close($db);
	die(header("Location: av_events_viewall.php"));
	
}
?>